﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Data.Objects;

namespace NAccounting
{
    public partial class CompanyCloseDate
    {
    }

    public static class CompanyCloseDateCollectionExtensions
    {
        public static bool CanCreateLotInDate(this ObjectSet<CompanyCloseDate> source, DateTime date)
        {
            var dt = date.FirstDayOfMonth();
            return !source.Any(x => x.CloseDate == dt);
        }
    }
}